package com.heima.Listener;

import com.heima.Serivce.SearchService;
import com.heima.common.exception.RabbitMQcode;
import org.springframework.amqp.rabbit.annotation.Queue;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.stereotype.Component;
import reactor.util.concurrent.Queues;

@Component
public class listener {
    @Autowired
    SearchService searchService;
    @RabbitListener(queues = RabbitMQcode.ESQueueName)
    public void AddData(Long id)
    {
        searchService.AddToES(id);
    }

}
